<script setup>
import { ref } from 'vue'
import { NEmpty, NButton, NList, NListItem } from 'naive-ui'
import useGlobalStore from '../store/GlobalInfo'
const store = useGlobalStore()
</script>

<template>
  <n-empty v-if="Object.keys(store.config.preset).length === 0">
    <template #default>
      <div>试试在下方操作栏添加一条预设</div>
    </template>
  </n-empty>
  <n-list v-else>
    <n-list-item
      v-for="(item, index) in store.config.preset"
      :key="index"
      style="text-align: center"
    >
      <n-button style="width: 100%" tertiary @click="usePreset(item)">{{ index }}</n-button>
    </n-list-item>
  </n-list>
</template>

<style>
/*@import '/src/style.css'*/
</style>
